<template>
  <div class="app-container">
    <AppHeader v-if="showHeader" />
    <main class="w-full">
      <slot />
    </main>
    <Footer />
  </div>
</template>

<script setup lang="ts">
const route = useRoute()

// 通过路由元数据控制头部显示
const showHeader = computed(() => {
  return route.meta.showHeader ?? true
})
</script>